<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DI_FIXEDIT</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DI_FIXEDIT</h1>
<div class=navbar>
<a href="../../index.html">main</a> |
<a href="../index.html">Dialog API</a> |
<a href="index.html">Dialog items</a><br>
</div>

<div class=shortdescr>The <dfn>DI_FIXEDIT</dfn> dialog item describes a fixed size edit box.
It is the same as <a href="di_edit.html">DI_EDIT</a>, except the text in the <dfn>DI_FIXEDIT</dfn> cannot be scrolled.
</div>

<pre class=syntax>
struct FarDialogItem
{
  int Type          = <b>DI_FIXEDIT</b>
  int X1            = <b>X1</b>
  int Y1            = <b>Y</b>
  int X2            = <b>X2</b>
  int Y2            = <b>Y</b> (equals to Y1)
  int Focus         = <b>Focus</b>
  union{
    char *History   = <b>History</b>
    char *Mask;     = <b>Mask</b>
  };
  DWORD Flags       = <b>Flags</b>
  int DefaultButton = <b>DefaultButton</b>
  char Data[512]    = <b>the text for editing</b>
};
</pre>
<p class=note><img src="../../../images/note.gif" alt="Attention!" width="10" height="10"> Attention!</p>
<UL class=note>
  <LI>This is an exemplary structure; read full description <a href="../structures/fardialogitem.html">here</a>.</LI>
</UL>

<h3>Focus</h3>
<div class=descr>
  <div class=descr>Keyboard focus flag.</div>
</div>

<h3>History</h3>
<div class=descr>
  <p>Contains the address of a null-terminated text string that will be used as the internal history name when an edit control has the <a href="../flags/dif_history.html">DIF_HISTORY</a> flag. If several edit fields have the same history name, they will share the same history list.</p>
</div>

<h3>Mask</h3>
<div class=descr>
Contains the address of a null-terminated string that serves as a mask for user input when the <a href="../flags/dif_maskedit.html">DIF_MASKEDIT</a> flag is set.
NULL value means the edit field has no input mask.
</div>

<div class=alert2>The <dfn>DIF_HISTORY</dfn> flag has higher priority than the <dfn>DIF_MASKEDIT</dfn> flag.</div>


<h3>Flags</h3>
<div class=descr>
There are several flags applicable to <dfn>DI_FIXEDIT</dfn>:<br>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Flag</th><th class="cont" width="60%">Description</th></tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_history.html">DIF_HISTORY</a></td>
 <td class="cont" width="60%">Adds a history list to an edit control. If this flag is set, the History field must contain the address of a text string that will be used as the internal name of the history.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_manualaddhistory.html">DIF_MANUALADDHISTORY</a></td>
 <td class="cont" width="60%">Specifies that items will be added to the history list of an edit box only manually and not automatically. Must be used together with DIF_HISTORY.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_uselasthistory.html">DIF_USELASTHISTORY</a></td>
 <td class="cont" width="60%">The initial value will be set to the last history element.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_maskedit.html">DIF_MASKEDIT</a></td>
 <td class="cont" width="60%">Uses the null-terminated string in the Mask field as a filter for user input.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_disable.html">DIF_DISABLE</a></td>
 <td class="cont" width="60%">Disables user access to the edit control.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_readonly.html">DIF_READONLY</a></td>
 <td class="cont" width="60%">Sets read-only state for the edit control. </td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_selectonentry.html">DIF_SELECTONENTRY</a></td>
 <td class="cont" width="60%">Makes the edit control always select the text when it receives the focus.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_nofocus.html">DIF_NOFOCUS</a></td>
 <td class="cont" width="60%">The dialog item cannot receive keyboard focus, but can handle other user events.</td>
 </tr>
</table>
</div>

<h3>Events</h3>
<div class=descr>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Event</th><th class="cont" width="60%">Description</th></tr>

 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_drawdlgitem.html">DN_DRAWDLGITEM</a></td>
 <td class="cont" width="60%">This event is sent to the dialog callback function just before the edit box is drawn.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_ctlcolordlgitem.html">DN_CTLCOLORDLGITEM</a></td>
   <td class="cont" width="60%">Plugin should pass the color attributes of the edit control when this event comes. Param2 parameter:
     <pre>LoWord LoByte - color of the text
                (<a href="../../defs/farcolors.html#COL_WARNDIALOGEDIT">COL_WARNDIALOGEDIT</a> or
                 <a href="../../defs/farcolors.html#COL_DIALOGEDIT">COL_DIALOGEDIT</a>)
LoWord HiByte - color of selected text
                (<a href="../../defs/farcolors.html#COL_DIALOGEDITSELECTED">COL_DIALOGEDITSELECTED</a>)
HiWord LoByte - color of unchanged text
                (<a href="../../defs/farcolors.html#COL_DIALOGEDITUNCHANGED">COL_DIALOGEDITUNCHANGED</a>)
HiWord HiByte - color of the History drop-down arrow
                (<a href="../../defs/farcolors.html#COL_DIALOGTEXT">COL_DIALOGTEXT</a>)</pre></td></tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_key.html">DN_KEY</a></td>
 <td class="cont" width="60%">This event comes after the user has pressed a key in the dialog.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_mouseclick.html">DN_MOUSECLICK</a></td>
 <td class="cont" width="60%">This event comes after the user has clicked one of the dialog items or outside the dialog with the mouse button.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_editchange.html">DN_EDITCHANGE</a></td>
 <td class="cont" width="60%">The text in the edit field has been changed.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_killfocus.html">DN_KILLFOCUS</a></td>
 <td class="cont" width="60%">This event is sent before the combo box loses the focus, if the flag <a href="../flags/dif_nofocus.html">DIF_NOFOCUS</a> was not used.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_killfocus.html">DN_GOTFOCUS</a></td>
 <td class="cont" width="60%">This event is sent after the button has received the keyboard focus, if the flag <a href="../flags/dif_nofocus.html">DIF_NOFOCUS</a> was not used.</td>
 </tr>

</table>
</div>

<h3>Remarks</h3>
<div class=descr>
<p>The text cursor in the <dfn>DI_FIXEDIT</dfn> edit field will initially be in overwrite mode.</p>
</div>


<div class=see>See also:</div><div class=seecont>
<a href="di_edit.html">DI_EDIT</a>,
<a href="di_pswedit.html">DI_PSWEDIT</a>,
<a href="../structures/fardialogitem.html">FarDialogItem</a>

</div>

</body>
</html>